# 先查找要拉取的版本
kubeadm config images list
#kubeadm config images list --kubernetes-version=v1.20.4

# 从代替源获取docker images
#   阿里云
origrin=registry.aliyuncs.com/google_containers
#   docker hub
#origrin=mirrorgooglecontainers

images=(
kube-apiserver:v1.20.4
kube-controller-manager:v1.20.4
kube-scheduler:v1.20.4
kube-proxy:v1.20.4
pause:3.2
etcd:3.4.13-0
coredns:1.7.0
)
for imageName in ${images[@]}
do
docker pull $origrin/$imageName
docker tag $origrin/$imageName k8s.gcr.io/$imageName
docker rmi $origrin/$imageName
done